<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="zh">
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<head>
    <base href="/">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no, shrink-to-fit=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="apple-mobile-web-app-capable" content="no"/>
    <meta name="format-detection" content="telephone=no">
    <title>支付结果</title>
    <script src="static/js/cssrem.js"></script>
    <link href="static/css/style.css" rel="stylesheet">
</head>

<body>
<script>
if (
  typeof test !== 'undefined' ||
  (typeof window.webkit !== 'undefined' && typeof window.webkit.messageHandlers.canJsGoBack !==
      'undefined')
) {
  document.write(
    '<header class="header"><div class="header-bg"></div><div class="titlet-bar white"><a class="btn-goback active dib"></a><div class="title ell g3">支付结果</div></div></header>'
  )
}else{
  document.write(
    '<header class="header dn"><div class="header-bg"></div><div class="titlet-bar white"><a class="btn-goback active dib"></a><div class="title ell g3">支付结果</div></div></header>'
  )
}
</script>
<!-- <header class="header">
    <div class="header-bg"></div>
    <div class="titlet-bar white">
        <a href="javascript:;" class="btn-goback active dib"></a>
        <div class="title ell g3">支付结果</div>
    </div>
</header> -->
<div class="content bgwh">
    <div class="wrapper">
        <div class="m20 p20"></div>

        <c:choose>
            <c:when test="${state == '01' }">
                <div class="icon-success auto photo100"><img alt="" src="static/images/icon-success.png"></div>
                <dl class="tc mt20 pt20">
                    <dt class="f36 g3">支付成功</dt>
                    <dd class="f28 g9 pt20">您已成功支付${price }元</dd>
                </dl>
            </c:when>
            <c:otherwise>
                <div class="icon-failure auto photo100"><img alt="" src="static/images/icon-failure.png"></div>
                <dl class="tc mt20 pt20">
                    <dt class="f36" style="color: #ff2521;">支付中</dt>
                    <dd class="f28 g9 pt20">请耐心等待！</dd>
                </dl>
            </c:otherwise>
        </c:choose>

        <div class="m20 p20"></div>
        <div class="tc m20 p20 f0">
            <a class="btn-submit btn-submit--plain db" style="width:auto;margin-top:20px;"
               href="javascript:goMainPage();">查看订单</a>
            <a class="btn-submit db" style="width:auto;margin-top:20px" href="javascript:goAdoptPage();">继续认养</a>
        </div>
    </div>
</div>
<link href="http://cdn.bootcss.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet">
<script type="text/javascript" src="static/js/app.js"></script>
<script type="text/javascript">
    function goAdoptPage() {
        if (typeof test !== 'undefined') {
            test.goAdoptPage()
        } else if (typeof window.webkit !== 'undefined' && typeof window.webkit.messageHandlers.canJsGoBack !==
            'undefined') {
        } else {
        	window.location.href = '${h5Domain}'
        }

    }

    function goMainPage() {
        if (typeof test !== 'undefined') {
            test.goMainPage()
        } else if (typeof window.webkit !== 'undefined' && typeof window.webkit.messageHandlers.canJsGoBack !==
            'undefined') {
            window.webkit.messageHandlers.goMainPage.postMessage('ios')
        } else {
        	window.location.href = '${h5Domain}/ordersList'
        }
    }
</script>
	<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?24fb3d27099c50ae04b59301e492b50c";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
</body>
</html>
